<template>
  <navbar></navbar>
  <div
    class="main up"
    style="background: rgba(248, 248, 248, 1); min-height: calc(100vh)"
  >
    <router-view />
  </div>
  <tabbar v-if="globalStore.state.showTabBar"></tabbar>
</template>

<script>
  import {
    computed,
    defineComponent,
    ref,
    toRefs,
    onMounted,
    reactive,
    watch,
    getCurrentInstance,
  } from "vue";
  import tabbar from '../components/tabbar/index.vue'
  import tab_pages from '../utils/constant/tab_pages.js'
  import navbar from '../components/navbar/index.vue'
  import {globalStore} from '../store/globalStore.js'
  export default defineComponent({
    components:{
      tabbar,
      navbar
    },
    setup(props) {
      const { proxy } = getCurrentInstance()
      const home = () => {
         proxy.$router.push("/")
      };
      const select = (index, path, e) => {
        if (proxy.$router.currentRoute.path !== index) {
          proxy.$router.push({ path: `${index}`, query: {} })
        }
      };
      return {
        globalStore,
        home,
        select,
      };
    },
  });
</script>
<style lang="less" scoped>
  .head {
    background-color: #1989fa;
    color: #fff;
    // height: 60px;
    padding: 10px 20px;
  }
  .lms-icon {
    font-weight: bold;
    font-size: 24px;
  }
</style>
